package com.gaogzhen.intro.commonMethod;

import lombok.extern.slf4j.Slf4j;

@Slf4j(topic = "cm.test01")
public class CMJoin {
    private static int r = 0;
    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(() -> {
            try {
                Thread.sleep(1000);
                r = 10;
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        });
        t1.start();
        t1.join(100);
        log.debug("r = " + r);
    }
}
